// @ts-ignore
/* eslint-disable */
import request from "@/util/request.ts";

/** 此处后端没有提供注释 POST /readingRoomReservation/add */
export async function addReadingRoomReservation(
  body: API.AddReadingRoomReservationRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong>("/readingRoomReservation/add", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /readingRoomReservation/delete */
export async function deleteReadingRoomReservation(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteReadingRoomReservationParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/readingRoomReservation/delete", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /readingRoomReservation/get */
export async function listReadingRoomReservation(options?: {
  [key: string]: any;
}) {
  return request<API.BaseResponseListReadingRoomReservation>(
    "/readingRoomReservation/get",
    {
      method: "GET",
      ...(options || {}),
    }
  );
}

/** 此处后端没有提供注释 GET /readingRoomReservation/my */
export async function getMyReservations(options?: { [key: string]: any }) {
  return request<API.BaseResponseListReadingRoomReservationVO>(
    "/readingRoomReservation/my",
    {
      method: "GET",
      ...(options || {}),
    }
  );
}
